//
//  XFXRecreationTopView.m
//  XFXnews
//
//  Created by dllo on 16/1/30.
//  Copyright © 2016年 lanou. All rights reserved.
//

#import "XFXRecreationTopView.h"


@interface XFXRecreationTopView ()

@property (nonatomic, retain) UIScrollView *myScrollView;
@property (nonatomic, retain) UILabel *title;
@property (nonatomic, retain) UIImageView *myImageView;

@end
@implementation XFXRecreationTopView

- (instancetype)initWithFrame:(CGRect)frame{
    
    self = [super initWithFrame:frame];
    if (self) {
        [self createSubViews];
    }return self;
}

- (void)createSubViews{
    
    self.myScrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, XFXWIDTH, XFXHEIGHT * 0.28)];
    self.myScrollView.pagingEnabled = YES;
    self.myScrollView.bounces = NO;
    
    self.myImageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, XFXWIDTH, XFXHEIGHT * 0.28)];
    [self.myScrollView addSubview:self.myImageView];
    [self addSubview:self.myScrollView];
    
}

- (void)setImgsrc:(NSString *)imgsrc{
    
    _imgsrc = imgsrc;
    NSURL *url = [NSURL URLWithString:_imgsrc];
    [self.myImageView sd_setImageWithURL:url placeholderImage:nil];
    
}


@end
